package tr.richfacesext.resourcemanagement;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * 
 * @author mert
 *
 */
@SuppressWarnings("serial")
public class ResourceHolder implements Serializable{

	private List<String> resources;
	
	public ResourceHolder() {
		resources = new ArrayList<String>();
	}

	public List<String> getResources() {
		return resources;
	}

	public void setResources(List<String> resources) {
		this.resources = resources;
	}
	
	public void addResource(String resourceName) {
		if(!resources.contains(resourceName))
			resources.add(resourceName);
	}
	
	public void emptyResources() {
		resources.clear();
	}
}